package com.hwg.shiliupro.po;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class User {
    private Integer id;         //主键
    private String number;      //学号 && 账号
    private String password;    //密码
    private String name;        //姓名
    private String sex;         //性别
    private String academy;     //学院
    private String sgroup;      //组别
    //    -----------------------------详细信息
    private String major;       //专业
    private String campus;      //校区
    private String mail;        //邮箱
    private String phone;       //手机号
    private Integer deleted;    //逻辑删除字段  默认为 1 为有效   0为已删除
    @TableField(value = "protect_code")
    private String protectCode; //重置密码时的保护码
    @TableField(value = "end_time")
    private String endTime;      //拉黑截至时间            是否拉黑、拉黑多久的标识
    @TableField(value = "block_time")
    private String blockTime;     //拉黑开始时间
    @TableField(exist = false)
    private List<Note> noteList;     //笔记集合  一方存多方的集合

    public User() {
    }

    public User(String number, String name, String sgroup) {
        this.number = number;
        this.name = name;
        this.sgroup = sgroup;
    }

    public User(String number, String password, String name, String sex, String academy, String sgroup, String major, String campus, String mail, String phone) {
        this.number = number;
        this.password = password;
        this.name = name;
        this.sex = sex;
        this.academy = academy;
        this.sgroup = sgroup;
        this.major = major;
        this.campus = campus;
        this.mail = mail;
        this.phone = phone;
    }

    public User(Integer id, String number, String password, String name, String sex, String academy, String sgroup, String major, String campus, String mail, String phone, Integer deleted) {
        this.id = id;
        this.number = number;
        this.password = password;
        this.name = name;
        this.sex = sex;
        this.academy = academy;
        this.sgroup = sgroup;
        this.major = major;
        this.campus = campus;
        this.mail = mail;
        this.phone = phone;
        this.deleted = deleted;
    }

    public User(Integer id, String number, String password, String name, String sex, String academy, String sgroup, String major, String campus, String mail, String phone) {
        this.id = id;
        this.number = number;
        this.password = password;
        this.name = name;
        this.sex = sex;
        this.academy = academy;
        this.sgroup = sgroup;
        this.major = major;
        this.campus = campus;
        this.mail = mail;
        this.phone = phone;
    }

    public User(Integer id, String number, String password, String name, String sex, String academy, String sgroup, String major, String campus, String mail, String phone, Integer deleted, String protectCode) {
        this.id = id;
        this.number = number;
        this.password = password;
        this.name = name;
        this.sex = sex;
        this.academy = academy;
        this.sgroup = sgroup;
        this.major = major;
        this.campus = campus;
        this.mail = mail;
        this.phone = phone;
        this.deleted = deleted;
        this.protectCode = protectCode;
    }

    public User(Integer id, String number, String password, String name, String sex, String academy, String sgroup, String major, String campus, String mail, String phone, List<Note> noteList) {
        this.id = id;
        this.number = number;
        this.password = password;
        this.name = name;
        this.sex = sex;
        this.academy = academy;
        this.sgroup = sgroup;
        this.major = major;
        this.campus = campus;
        this.mail = mail;
        this.phone = phone;
        this.noteList = noteList;
    }

}
